<%@ page import="com.pandorasoft.shop.Shop" %>



<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'name', 'error')} ">
	<label for="name">
		<g:message code="shop.name.label" default="Name" />
		
	</label>
	<g:textField name="name" value="${shopInstance?.name}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'province', 'error')} ">
	<label for="province">
		<g:message code="shop.province.label" default="Province" />
		
	</label>
	<g:textField name="province" value="${shopInstance?.province}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'location', 'error')} ">
	<label for="location">
		<g:message code="shop.location.label" default="Location" />
		
	</label>
	<g:textField name="location" value="${shopInstance?.location}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'tel', 'error')} ">
	<label for="tel">
		<g:message code="shop.tel.label" default="Tel" />
		
	</label>
	<g:textField name="tel" value="${shopInstance?.tel}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'phone', 'error')} ">
	<label for="phone">
		<g:message code="shop.phone.label" default="Phone" />
		
	</label>
	<g:textField name="phone" value="${shopInstance?.phone}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'googleMap', 'error')} ">
	<label for="googleMap">
		<g:message code="shop.googleMap.label" default="Google Map" />
		
	</label>
	<g:textField name="googleMap" value="${shopInstance?.googleMap}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'company', 'error')} required">
	<label for="company">
		<g:message code="shop.company.label" default="Company" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="company.id" from="${com.pandorasoft.shop.Company.list()}" optionKey="id" value="${shopInstance?.company?.id}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'consumers', 'error')} ">
	<label for="consumers">
		<g:message code="shop.consumers.label" default="Consumers" />
		
	</label>
	
<ul>
<g:each in="${shopInstance?.consumers?}" var="c">
    <li><g:link controller="consumer" action="show" id="${c.id}">${c?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="consumer" action="create" params="['shop.id': shopInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'consumer.label', default: 'Consumer')])}</g:link>

</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'employees', 'error')} ">
	<label for="employees">
		<g:message code="shop.employees.label" default="Employees" />
		
	</label>
	
<ul>
<g:each in="${shopInstance?.employees?}" var="e">
    <li><g:link controller="employee" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="employee" action="create" params="['shop.id': shopInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'employee.label', default: 'Employee')])}</g:link>

</div>

<div class="fieldcontain ${hasErrors(bean: shopInstance, field: 'shopType', 'error')} required">
	<label for="shopType">
		<g:message code="shop.shopType.label" default="Shop Type" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="shopType.id" from="${com.pandorasoft.shop.ShopType.list()}" optionKey="id" value="${shopInstance?.shopType?.id}"  />
</div>

